package com.foreknow.demo18;

/**
 * Java中动态可变参数
 */
public class DyParameter {
    public void m1(int a,int b) {
        System.out.println(a+b);
    }

    public void m2(int a,int b,Object...values) {

    }

    public static void main(String[] args) {
        DyParameter dy = new DyParameter();
        dy.m1(1,2);
        dy.m2(2,3,4,5,6,7);
    }
}
